package cn.itcast.dao.impl;

import cn.itcast.dao.AccountDao;
import cn.itcast.entity.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class AccountDaoImpl implements AccountDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public void save(Account account) {
        jdbcTemplate.update("insert into account(uid,money)values(?,?)",account.getUid(),account.getMoney());
    }
}
